package com.tsingtree.modular.enums;

import lombok.Getter;

import java.util.Map;
import java.util.TreeMap;

@Getter
public enum UserConditionEnum {

    EVERY(0, "所有人"),
    FOLLOWING(1, "我关注的人"),
    BOTH(2, "互相关注的人"),
    NONE(3, "没有人"),
    ;

    private final int key;

    private final String desc;

    UserConditionEnum(int key) {
        this.key = key;
        this.desc = "";
    }

    UserConditionEnum(int key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static Map<Integer, String> getAll() {
        Map<Integer, String> map = new TreeMap<>();
        for (UserConditionEnum loanInterestEnum : UserConditionEnum.values()) {
            map.put(loanInterestEnum.getKey(), loanInterestEnum.getDesc());
        }
        return map;
    }

}
